export interface ToolAuthor {
  owner: string;
  technicalSupport?: string;
  contributors?: string[];
}

export interface ToolStats {
  views: number;
  likes: number;
  likedBy: string[]; // 用于记录点赞用户（使用sessionId）
}

export interface ToolIssue {
  id: string;
  toolId: string;
  title: string;
  description: string;
  type: 'bug' | 'feature' | 'question' | 'other';
  status: 'open' | 'in-progress' | 'resolved' | 'closed';
  priority: 'low' | 'medium' | 'high';
  createdBy: string;
  createdAt: string;
  updatedAt?: string;
  replies?: IssueReply[];
}

export interface IssueReply {
  id: string;
  content: string;
  createdBy: string;
  createdAt: string;
}

export interface Tool {
  id: string;
  name: string;
  description: string;
  icon: string;
  category: string;
  url: string;
  type: 'iframe' | 'external' | 'internal';
  tags: string[];
  author?: string; // 兼容旧版本
  authorInfo?: ToolAuthor;
  version?: string;
  createdAt?: string;
  stats?: ToolStats;
}

export interface ToolCategory {
  id: string;
  name: string;
  icon: string;
  color: string;
}

